import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { NgModule,  CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { HttpModule } from '@angular/http';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';

// import { Interceptor } from './http.interceptors';


import { AppComponent } from './app.component';
import { HomepageComponent } from './homepage/homepage.component';
import { BindIdComponent } from './bind-id/bind-id.component';
import { AddCarComponent } from './add-car/add-car.component';
import { CarInfoComponent } from './car-info/car-info.component';
import { OrderListComponent } from './order-list/order-list.component';
import { AppRoutingModule } from './/app-routing.module';
import { OrderDetailComponent } from './order-detail/order-detail.component';
import { UsercenterComponent } from './usercenter/usercenter.component';
import { DrawMoneyComponent } from './draw-money/draw-money.component';
import { AccountDetailComponent } from './account-detail/account-detail.component';
import { ShareComponent } from './share/share.component';
import { FriendsComponent } from './friends/friends.component';
import { SetComponent } from './set/set.component';
import { EditCardComponent } from './edit-card/edit-card.component';
import { ServiceComponent } from './service/service.component';
import { ApplyComponent } from './apply/apply.component';
import { BindCardComponent } from './bind-card/bind-card.component';

import { OnsenModule } from 'ngx-onsenui';
import { FooterComponent } from './footer/footer.component';

import { MarketComponent } from './market/market.component';
import { RuleComponent } from './rule/rule.component';
import { UserService } from './user.service';
import { HttpService } from './http.service';
import { CarService } from './car.service';
import { PayService } from './pay.service';
import { ProtocolComponent } from './protocol/protocol.component'


@NgModule({
  declarations: [
    AppComponent,
    HomepageComponent,
    BindIdComponent,
    AddCarComponent,
    CarInfoComponent,
    OrderListComponent,
    OrderDetailComponent,
    UsercenterComponent,
    DrawMoneyComponent,
    AccountDetailComponent,
    ShareComponent,
    FriendsComponent,
    SetComponent,
    EditCardComponent,
    ServiceComponent,
    ApplyComponent,
    BindCardComponent,
    FooterComponent,
    MarketComponent,
    RuleComponent,
    ProtocolComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AppRoutingModule,
    OnsenModule,
    HttpModule,
    HttpClientModule
  ],
  providers: [UserService, HttpService, CarService, PayService,
    // Interceptor
    //  [{ provide: HTTP_INTERCEPTORS, useValue: Interceptor, multi: true }]
  ],
  bootstrap: [AppComponent],
  schemas: [
		CUSTOM_ELEMENTS_SCHEMA,
	]
})

export class AppModule { }
